/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/

Copyright (c) 2000-2007 The OGRE Team
Also see acknowledgements in Readme.html

You may use this sample code for anything you like, it is not covered by the
LGPL like the rest of the engine.
-----------------------------------------------------------------------------
*/

/*
-----------------------------------------------------------------------------
Filename:    WallAvoid.h
Description: A place for me to try out stuff with OGRE.
-----------------------------------------------------------------------------
*/
#ifndef __WallAvoid_h_
#define __WallAvoid_h_

#include "stdafx.h"
//#include "ExampleApplication.h"


class Wall3D;
class Wall3DStrip;
class Boid;
class World;

class WallAvoidFrameListener : public ExampleFrameListener
{
private:
	SceneManager* mSceneMgr;
	//Boid* boid;
	World* mWorld;
public:
	WallAvoidFrameListener(SceneManager *sceneMgr, RenderWindow* win, Camera* cam,World* world)
         : ExampleFrameListener(win, cam),
         mSceneMgr(sceneMgr), mWorld(world)
	{
	}

	bool frameStarted(const FrameEvent& evt);
	bool processUnbufferedKeyInput(const FrameEvent& evt);
};



class WallAvoidApp : public ExampleApplication
{
public:
	WallAvoidApp() : mWorld(NULL) {}
	~WallAvoidApp();

	World* mWorld;

protected:

	/*virtual */void createCamera(void);
	/*virtual */void createScene(void);
	void createFrameListener(void);

	void createWallMesh(const Wall3D& wall,String strName);
	void createWallMesh2(const Wall3D& wall,String strName);
	void createWallsMesh(const std::vector<Wall3D> walls,String strName);
	void createWallStripMesh(const Wall3DStrip* wstrip,String strName,
		float htextile=0,float vtextile=0);
	void createSphere(const std::string& strName, const float r, 
		const int nRings, const int nSegments);
	void createCube();
	
};

#endif // #ifndef __WallAvoid_h_